package com.ormbench.base.model;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="history")
public class History extends BaseModel {
	
	@Basic
	@Column(name = "branch_id", nullable = false)
	private Long branchId;
	public Long getBranchId() { return branchId; }
	public void setBranchId(Long branchId) { this.branchId = branchId; }

	@ManyToOne(cascade = CascadeType.REMOVE)
    @JoinColumn(name = "branch_id", insertable=false, updatable=false)
	private Branch branch;
	public Branch getBranch() { return branch; }
	public void setBranch(Branch branch) { this.branch = branch; }
	
	@Basic
	@Column(name = "teller_id", nullable = false)
	private Long tellerId;
	public Long getTellerId() { return tellerId; }
	public void setTellerId(Long tellerId) { this.tellerId = tellerId; }

	@ManyToOne(cascade = CascadeType.REMOVE)
    @JoinColumn(name = "teller_id", insertable=false, updatable=false)
	private Teller teller;
	public Teller getTeller() { return teller; }
	public void setTeller(Teller teller) { this.teller = teller; }
	
	@Basic
	@Column(name = "account_id", nullable = false)
	private Long accountId;
	public Long getAccountId() { return accountId; }
	public void setAccountId(Long accountId) { this.accountId = accountId; }

	@ManyToOne(cascade = CascadeType.REMOVE)
    @JoinColumn(name = "account_id", insertable=false, updatable=false)
	private Account account;
	public Account getAccount() { return account; }
	public void setAccount(Account account) { this.account = account; }
	
	@Basic
	@Column(name = "delta", nullable = true)
	private Integer delta;
	public Integer getDelta() { return this.delta; }
	public void setDelta(Integer delta) { this.delta = delta; }
	
	@Basic
	@Column(name = "filler", nullable = true, length = 128)
	private String filler;
	public String getFiller() { return this.filler; }
	public void setFiller(String filler) { this.filler = filler; }
}
